<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>

</head>

<body>
  <div id="app">
    <h5>这是 根组件展示的样式</h5>

    <div>这里使用 type module 记得使用 live-serve 启动一个本地的静态服务</div>

    <button @click="show1 = !show1">折叠案例1</button>
    <button @click="show2 = !show2">折叠案例2</button>
    <hr>
    <!-- <div v-show="show1">
      <rich-text-preview :html="data1" overflow='scroll' :previewImg='true'>
      </rich-text-preview>
    </div> -->
<!--
    <div v-show="show2">
      <rich-text-preview :html="data2" overflow='scroll' :previewImg='true'>
      </rich-text-preview>
      <rich-text-preview :html="data2" overflow='scroll' :previewImg='true'>
      </rich-text-preview>
    </div> -->

    <!-- :lazy="false" -->
    <rich-text-preview :html="data3"  :previewImg='true' >
    </rich-text-preview>
  </div>

  <!-- 这里使用 type module  记得使用 live-serve 启动一个本地的静态服务 -->
  <script type="module">
    import richTextPreview from '../lib/index.esm.js'
    import data1 from '/test/data1.js'
    import data2 from '/test/data2.js'
    import data3 from '/test/data3.js'

    Vue.use(richTextPreview.install)

    new Vue({
      el: '#app',
      data () {
        return {
          data1: data1,
          data2: data2,
          data3: data3,
          show1: false,
          show2: true
        }
      }
    })
  </script>

</body>

</html>